package com.hibase.core.sequence.service;


import com.github.pagehelper.PageInfo;
import com.hibase.core.mybatis.service.BaseService;
import com.hibase.core.sequence.entity.MdsCodeSequenceRegex;
import com.hibase.core.sequence.entity.vo.MdsCodeSequenceRefreshVO;
import com.hibase.core.sequence.entity.vo.MdsCodeSequenceRegexSearchVO;


/**
 * <p>
 * 流水号通配符规则表 服务类
 * </p>
 *
 * @author chenfeng
 * @since 2021-01-19
 */
public interface MdsCodeSequenceRegexService extends BaseService<MdsCodeSequenceRegex> {

    /**
     * 查询流水号通配符规则表列表
     *
     * @param searchVO
     * @return
     */
    PageInfo<MdsCodeSequenceRegex> selectMdsCodeSequenceRegexList(MdsCodeSequenceRegexSearchVO searchVO);

    /**
     * 改变流水号通配符规则表记录
     *
     * @param entity
     * @return
     */
    void saveMdsCodeSequenceRegex(MdsCodeSequenceRegex entity);

    /**
     * 查询流水号通配符规则表详情
     *
     * @param id
     * @return
     */
    MdsCodeSequenceRegex viewMdsCodeSequenceRegex(String id);

    /**
     * 删除流水号通配符规则表
     *
     * @param id
     */
    void deleteMdsCodeSequenceRegex(String id);


    /**
     * 生成单号,根据单据类型以及通配符
     *
     * @param sequenceType
     * @return
     */
    String generateCode(String sequenceType,String fix);

    /**
     * 生成单号,根据单据类型以及通配符
     *
     * @param sequenceType
     * @return
     */
    String generateCode(String sequenceType);

    /**
     * 刷新流水号调整步长
     * @param refreshVO
     */
    void refreshMdsCodeSequence(MdsCodeSequenceRefreshVO refreshVO);
}
